<?php
	session_start();
?>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>I am fly</title>
    <link rel="stylesheet" type="text/css" href="css/index.css">
    <script>
        //禁止使用手机端登陆页面
       if (/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent) ) {
           alert("请使用电脑端访问");
           window.location.href="about:blank";
           window.close();
       }
    </script>



    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

</head>
<body>
    <div class="index_pic" >
         <div class="content">

             <div class="bimages">
                 <div class="cover">
                     <div class="login" id="login1">
                         <div class="login-text">
                             <a class="tt"  onmouseover="this.style.cursor='hand'" href="login.html ">LOGIN &nbsp;&nbsp;</a>
                             <a class="tt"  onmouseover="this.style.cursor='hand'" href="register.html">REGISTER </a>
                         </div>
                     </div>
                     <div class="heading">

                         <div class="heading_text_top">
                            <a style="font-size: 40px; font-weight: bolder";>Enter my Blog</a>
                         </div>
                     </div>
                 </div>
                 <div class="base">
                     <div class="base_text">
                         <p style="font-size: 15px">  Copyright © 2018 &nbsp; 我是一片云 &nbsp; &nbsp;陕ICP备18020063号-1</p>
                     </div>
                 </div>
             </div>
        </div>
    </div>
    <script>
        function setDiv(){
            var login = document.getElementById("login1");
	    login.style.display='none';
        }

	function sendWaringMessage(user){
	    var message="Welcome:" + user;
	    alert(message);
	}

    function GetUser() {
        var user = "<?php echo $_SESSION["USER"]?>";
        if(user == "" || user == null ||  user== undefined){ // "",null,undefined
            return;
        }
        else
        {
            setDiv();
            sendWaringMessage(user);
        }
    }
    GetUser();
    </script>
</body>
</html>
